package com.cn.整合.SpringBoot.topic;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.stereotype.Component;
import javax.jms.Topic;

/**
 * @author: dlr
 * @data: 2019/8/22 23:27
 * @desc: 配置类SpringBoot整合发布订阅
 */
@Component
@EnableJms
public class configProducerTopic {

    @Value("${topic-name}")
    private String topic;

    @Bean
    public Topic getTopic(){
        return new ActiveMQTopic(topic);
    }
}
